<% import grails.persistence.Event %>
<%=packageName%>

      <div id="list_${domainClass.propertyName}" class="pseudoTable">



                        <%  excludedProps = Event.allEvents.toList() << 'version'
                            props = domainClass.properties.findAll { !excludedProps.contains(it.name) && it.type != Set.class }
                            if(listItems){
                              Collections.sort(props, wcomparator.constructors[0].newInstance([domainClass, listItems] as Object[]))

                            }else{
                            Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[]))
                            }
                            props.eachWithIndex { p, i ->

                                if (!listItems || listItems.find{item -> item.equals(p.name)} ) {
                                    if (p.isAssociation()) { %>
                            <div class="pseudoTableCel"><g:message code="${domainClass.propertyName}.${p.name}.label" default="${p.naturalName}" /></div>
                   	    <%      } else { %>
                              <div class="pseudoTableCel"><g:message code="${domainClass.propertyName}.${p.name}.label" default="${p.naturalName}" /></div>

                        <%  }   }   } %>
                         <% if(rowActions){%>
                             <div class="pseudoTableCel">&nbsp;</div>
                        <% }  %>
                      <div class="pseudoTableCel">&nbsp;</div>
                      <div id="spacer" class="pseudoTableSpacer"></div>



                    <g:each in="\${${propertyName}List}" status="i" var="${propertyName}">
                        <div id="rowContainer_${propertyName}_\${${propertyName}.id}">
                             <g:include action="listRow" model="['${propertyName}' : ${propertyName} , 'i' : i]" />
                        </div>
                          <div id="div_data_\${${propertyName}.id}" class="jqInitialyHidden" ></div>
                          <div id="div_edit_\${${propertyName}.id}"  class="jqInitialyHidden" ></div>
                       <% props.eachWithIndex { p, i ->

                                if (!listItems || listItems.find{item -> item.equals(p.name)} ) {
                                    if (p.isAssociation()) { %>
                           <div id="div_data_${p.name}_\${${propertyName}.id}"  class="jqInitialyHidden"></div>
                      <% } } } %>
                    </g:each>

      </div>


